package com.my.lucky.dto;

import com.my.lucky.util.DataUtil;
import com.my.lucky.util.DateUtils;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

public class GaiNianDTO {
    Integer allstocks = 0;//总的家数
    Integer stocksUP = 0;//上涨的家数
    Integer stocksDown = 0;//下跌的家数
    Integer stocksPin = 0;//平开的家数
    Integer stocksLimit = 0;//涨停的家数
    Integer stocksDownLimit = 0;//跌停的家数
    List<SummaryBean> result;
    String flowGainian = "";//关注的概念
    LocalDateTime createdAt;
    BigDecimal todayAll;//所有板块汇总
    BigDecimal todayAllMain;//所有主力资金汇总

    public Integer getStocksPin() {
        return stocksPin;
    }

    public void setStocksPin(Integer stocksPin) {
        this.stocksPin = stocksPin;
    }

    public String getFlowGainian() {
        return flowGainian;
    }

    public void setFlowGainian(String flowGainian) {
        this.flowGainian = flowGainian;
    }

    public Integer getAllstocks() {
        return allstocks;
    }

    public void setAllstocks(Integer allstocks) {
        this.allstocks = allstocks;
    }

    public Integer getStocksUP() {
        return stocksUP;
    }

    public void setStocksUP(Integer stocksUP) {
        this.stocksUP = stocksUP;
    }

    public Integer getStocksDown() {
        return stocksDown;
    }

    public void setStocksDown(Integer stocksDown) {
        this.stocksDown = stocksDown;
    }

    public Integer getStocksLimit() {
        return stocksLimit;
    }

    public void setStocksLimit(Integer stocksLimit) {
        this.stocksLimit = stocksLimit;
    }

    public List<SummaryBean> getResult() {
        return result;
    }

    public void setResult(List<SummaryBean> result) {
        this.result = result;
    }

    public LocalDateTime getCreatedAt() {
        return createdAt;
    }

    public void setCreatedAt(LocalDateTime createdAt) {
        this.createdAt = createdAt;
    }

    public BigDecimal getTodayAll() {
        return todayAll;
    }

    public void setTodayAll(BigDecimal todayAll) {
        this.todayAll = todayAll;
    }

    public BigDecimal getTodayAllMain() {
        return todayAllMain;
    }

    public void setTodayAllMain(BigDecimal todayAllMain) {
        this.todayAllMain = todayAllMain;
    }

    public Integer getStocksDownLimit() {
        return stocksDownLimit;
    }

    public void setStocksDownLimit(Integer stocksDownLimit) {
        this.stocksDownLimit = stocksDownLimit;
    }

    @Override
    public String toString() {
        return "GaiNianDTO{" +
                "allstocks=" + allstocks +
                ", stocksUP=" + stocksUP +
                ", stocksDown=" + stocksDown +
                ", stocksPin=" + stocksPin +
                ", stocksLimit=" + stocksLimit +
                ", stocksDownLimit=" + stocksDownLimit +
                ", result=" + result +
                ", flowGainian='" + flowGainian + '\'' +
                ", createdAt=" + createdAt +
                ", todayAll=" + todayAll +
                ", todayAllMain=" + todayAllMain +
                '}';
    }


    public String toReviewContent() {
        return
                "日期#" + createdAt.toLocalDate()+" "+ DateUtils.getChineseWeekday(createdAt.toLocalDate())
                +";总数#" + allstocks +
                ";上涨#" + stocksUP +
                ";涨比#" + (allstocks==0?0:DataUtil.formatDecimal(100*stocksUP/allstocks))+
                ";下跌#" + stocksDown +
//                "; stocksPin=" + stocksPin +
                ";涨停#" + stocksLimit +
                ";跌停#" + stocksDownLimit
//               + "; result=" + result +
//                "; flowGainian='" + flowGainian + '\'' +
                +"; 总资金#" + DataUtil.convertToYi(todayAll) +
                "; 主力资金#" + DataUtil.convertToYi(todayAllMain)
                ;
    }

}
